export interface User {
  id: number;
  username: string;
  email: string;
  avatar?: string;
  bio?: string;
  createdAt: string;
  updatedAt: string;
}

export interface LoginRequest {
  email: string;
  password: string;
}

export interface RegisterRequest {
  username: string;
  email: string;
  password: string;
}

export interface UpdateProfileRequest {
  username?: string;
  bio?: string;
  avatar?: File;
}

export interface Video {
  id: number;
  title: string;
  description?: string;
  videoUrl: string;
  thumbnail?: string;
  user?: User;  // 保持可选，向后兼容
  username?: string;  // 新增字段
  userId?: number;    // 新增字段
  views: number;
  likes: number;
  createdAt: string;
  isLiked?: boolean;  // 新增字段，表示当前用户是否已点赞
}

export interface LiveStream {
  id: number;
  title: string;
  description?: string;
  user?: User;
  username?: string;
  userId?: number;
  streamKey: string;
  streamUrl: string;
  status: 'OFFLINE' | 'LIVE' | 'ENDED';
  viewers: number;
  likes: number;
  startedAt?: string;
  endedAt?: string;
  createdAt: string;
}

// 新增评论接口
export interface Comment {
  id: number;
  videoId: number;
  userId: number;
  username: string;
  content: string;
  createdAt: string;
}

// 新增关注接口
export interface Follow {
  id: number;
  followerId: number;
  followingId: number;
  createdAt: string;
} 